package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

/*学生对象
*
* */
@TableName("t_student")
public class StudentBean {
    @TableId(value = "pk_stuId",type = IdType.AUTO)
    private Integer id;//学生id
    @TableField("s_name")
    private String name;//学生姓名
    @TableField("s_sex")
    private String sex;//学生性别
    @TableField("s_phone")
    private String phone;//学生号码
    @TableField("s_date")
    private LocalDate stuInTime = LocalDate.now();//学生入住时间
    @TableField("s_imgurl")
    private String img;//学生头像
    @TableField("fk_roomId")
    private Integer roomId;
    @TableField("fk_classId")
    private Integer classId;
    @TableField(exist = false)
    private ClassBean classBean;//班级
    @TableField(exist = false)
    private RoomBean roomBean;//房间

    public StudentBean() {
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public StudentBean(Integer id, String name, String sex, String phone, LocalDate stuInTime, String img, ClassBean classBean, RoomBean roomBean) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.phone = phone;
        this.stuInTime = stuInTime;
        this.img = img;
        this.classBean = classBean;
        this.roomBean = roomBean;
    }

    public StudentBean(String name, String sex, String phone, LocalDate stuInTime, String img) {
        this.name = name;
        this.sex = sex;
        this.phone = phone;
        this.stuInTime = stuInTime;
        this.img = img;
    }

    public StudentBean(String name, String sex, String phone, LocalDate stuInTime, String img, ClassBean classBean, RoomBean roomBean) {
        this.name = name;
        this.sex = sex;
        this.phone = phone;
        this.stuInTime = stuInTime;
        this.img = img;
        this.classBean = classBean;
        this.roomBean = roomBean;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public LocalDate getStuInTime() {
        return stuInTime;
    }

    public void setStuInTime(LocalDate stuInTime) {
        this.stuInTime = stuInTime;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public ClassBean getClassBean() {
        return classBean;
    }

    public void setClassBean(ClassBean classBean) {
        this.classBean = classBean;
    }

    public RoomBean getRoomBean() {
        return roomBean;
    }

    public void setRoomBean(RoomBean roomBean) {
        this.roomBean = roomBean;
    }

    @Override
    public String toString() {
        return "StudentBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", phone='" + phone + '\'' +
                ", stuInTime=" + stuInTime +
                ", img='" + img + '\'' +
                ", classBean=" + classBean +
                ", roomBean=" + roomBean +
                '}';
    }
}
